/******************************************************************
 * @version      : 1.0
 * @Author       : zhl
 * @Date         : 2022-12-06 14:46:11
 * @LastEditors  : zhl
 * @E-Mail       : zhll168@163.com
 * @Description  : 业务描述
 ******************************************************************/

#ifndef __LINK_APDU_H__
#define __LINK_APUD_H__

#include <string>
#include <stdint.h>

#include "APDU.h"
#include "DLT698-Frame.h"

// typedef enum _LINK_APDU_TAG{
//     LINK_REQUEST    = 1,    //预连接请求 [2]
//     LINK_RESPONSE   = 129   //预连接响应 [129] 
// }LINK_APDU_TAG;


class Link_APDU{
private:
    /*  */
    static Link_APDU c_link_apdu;
    APDU  c_apdu;
public:
    Link_APDU();
    ~Link_APDU();

    static Link_APDU& getInstance();

    APDU&  packet(LINK_APDU_TAG tag, LINK_REQUEST_TYPE type, uint16_t heartbeat_interval);
    int  unpack(uint8_t* data, int& len, int start = 0);
};


#endif /*__LINK_APUD_H__*/